package com.mopa.ExtendsView;
import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.Window;
import android.view.WindowManager;
public class ExtendsViewActivity extends Activity implements OnTouchListener{
    /** Called when the activity is first created. */
//	private final static String picUrl="/mnt/sdcard/ptests.jpg";
//	private TransformMatrixView view;  
	private SpliceView m_view;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);  
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//        TwoMoveView m_view=new TwoMoveView(this);
        m_view = new SpliceView(this, 450, 690, 440, 10,new SpliceView.Callback() {
			
			@Override
			public void SaveImageComplete(Bitmap bmp) {
				// TODO Auto-generated method stub
				
			}
			
			@Override
			public void LoadImagesComplete() {
				// TODO Auto-generated method stub
				
			}
		});
        ImageInfo[] param=new ImageInfo[3];
        param[0]=new ImageInfo("/mnt/sdcard/Mopa/20111201090705.jpg", 90);
        param[1]=new ImageInfo("/mnt/sdcard/Mopa/20111201090700.jpg", 90);
        param[2]=new ImageInfo("/mnt/sdcard/Mopa/20111201090657.jpg", 90);
//        ImageInfo[] param=new ImageInfo[2];
//        param[0]=new ImageInfo("/mnt/sdcard/QQUsersIcon/0191816e367c5ee083da.png", 0);
//        param[1]=new ImageInfo("/mnt/sdcard/QQUsersIcon/b64ee713535d7ff5adfa.png", 0);

		m_view.setImages(param);
        setContentView(m_view);
//        view = new TransformMatrixView(this);  
//        view.setScaleType(ImageView.ScaleType.MATRIX);  
//        view.setOnTouchListener(this);  
//        setContentView(view);  
//        CommonImgEffectView view=new CommonImgEffectView(this);
//        setContentView(view);
//        PreviewImage mPreview=new PreviewImage(this);
//        mPreview.SetImage(picUrl);
//        setContentView(mPreview);
    }
//    private class RLayout extends RelativeLayout{
//		public RLayout(Context context) {
//			super(context);
//			initLayout(context);
//			// TODO Auto-generated constructor stub
//		}
//
//		private void initLayout(Context context) {
//			// TODO Auto-generated method stub
//			LayoutParams relativeParmas=new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
//			RelativeLayout mLayout=new RelativeLayout(context);
//			this.addView(mLayout,relativeParmas);
//			
//			relativeParmas=new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
//			relativeParmas.addRule(RelativeLayout.ALIGN_PARENT_TOP);
//			mFview=new FullView(context);
//			mLayout.addView(mFview, relativeParmas);
//		}
//    	
//    }
	@Override
	public boolean onTouch(View v, MotionEvent event) {
		// TODO Auto-generated method stub
		return false;
	}
	/**
			/mnt/sdcard/Mopa/20111201090705.jpg  <m_rotate>90
			/mnt/sdcard/Mopa/20111201090700.jpg  <m_rotate>90
			/mnt/sdcard/Mopa/20111201090657.jpg  <m_rotate>90
			/mnt/sdcard/QQUsersIcon/0191816e367c5ee083da.png  0
			/mnt/sdcard/QQUsersIcon/b64ee713535d7ff5adfa.png  0
			showW:450
			showH:690
			outputW:440
			border:10
	 */
}